﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets {
    import reprise.ui.*;
    import flash.events.*;
    import reprise.debug.*;

    public class PetsDebugInterface extends DebugInterface {

        public function PetsDebugInterface(_arg1:DocumentView, _arg2:String){
            var _local4:String;
            super(_arg1);
            var _local3:Array = _arg1.styleSheet.stylesheetURLs();
            for each (_local4 in _local3) {
                if (_local4.indexOf("http://localhost") == 0){
                    _local4 = (_arg2 + _local4.substr(16));
                    zz_observe_file(_local4, this.file_changed);
                } else {
                    if (_local4.indexOf("file://") == 0){
                        zz_observe_file(_local4.substr(7), this.file_changed);
                    };
                };
            };
        }
        override protected function file_changed(_arg1:String):void{
            l("file changed");
            super.file_changed(_arg1);
        }
        override protected function stage_keyDown(_arg1:KeyboardEvent):void{
            if (((_arg1.shiftKey) && (_arg1.ctrlKey))){
                l(_arg1.keyCode);
                if (_arg1.keyCode == 68){
                    toggleDebuggingMode();
                    return;
                };
                if ((((_arg1.keyCode == 83)) && (m_currentDebugElement))){
                    l(("Complex styles:\n" + m_currentDebugElement.valueForKey("m_complexStyles")));
                    return;
                };
                if (_arg1.keyCode == 82){
                    l("reload");
                    reloadStyles();
                    return;
                };
                if (_arg1.keyCode == 87){
                    startWatchingStylesheets();
                    return;
                };
            };
        }

    }
}//package net.wooga.pets 
